package gjtx4;

import java.util.Objects;

public class Staff1 implements Comparable<Staff1> {
    private String name;
    private int nianL;
    private String xingB;
    private String zhiW;
    private int xinShui;

    public Staff1(String name, int nianL, String xingB, String zhiW, int xinShui) {
        this.name = name;
        this.nianL = nianL;
        this.xingB = xingB;
        this.zhiW = zhiW;
        this.xinShui = xinShui;
    }

    public String getMame() {
        return name;
    }

    public void setMame(String mame) {
        this.name = mame;
    }

    public int getNianL() {
        return nianL;
    }

    public void setNianL(int nianL) {
        this.nianL = nianL;
    }

    public String getXingB() {
        return xingB;
    }

    public void setXingB(String xingB) {
        this.xingB = xingB;
    }

    public String getZhiW() {
        return zhiW;
    }

    public void setZhiW(String zhiW) {
        this.zhiW = zhiW;
    }

    public int getXinShui() {
        return xinShui;
    }

    public void setXinShui(int xinShui) {
        this.xinShui = xinShui;
    }

    public Staff1() {
    }

    @Override
    public String toString() {
        return "姓名:" + name +
                ",年龄:" + nianL + "岁" +
                ",性别：" + xingB +
                "职务：" + zhiW +
                "，薪水：" + xinShui + "元。";
    }

    @Override
    public int compareTo(Staff1 o) {
        return o.xinShui-this.xinShui;
    }
}
